package com.zzh.myapplication.activity;

import android.content.Intent;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.RelativeLayout;

import net.icarplus.car.R;
import net.icarplus.car.manager.BaseActivity;
import net.icarplus.car.tools.ToolBarHelper;

/**
 * Created by Administrator on 2016/3/21.
 */
public class SettingActivity extends BaseActivity {
    private Toolbar toolbar;
    private RelativeLayout setting_relativalayout;
    private RelativeLayout rlChangePasswd;

    @Override
    public void setContent() {
        setContentView(R.layout.activity_setting);
    }

    @Override
    public void initComponent() {
        toolbar = (Toolbar) findViewById(R.id.toolbar);
        ToolBarHelper.setNormalTitleAndBack(this, toolbar, getString(R.string.stting));
        setting_relativalayout = (RelativeLayout) findViewById(R.id.setting_relativalayout);
        rlChangePasswd = (RelativeLayout)findViewById(R.id.rl_pay_passwd);
    }

    @Override
    public void setListener() {
        setting_relativalayout.setOnClickListener(this);
        rlChangePasswd.setOnClickListener(this);
    }

    @Override
    public void onAfterInit() {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.setting_relativalayout:
                startActivity(new Intent(SettingActivity.this, ChangeUserPasswdActivity.class));
                break;

            case R.id.rl_pay_passwd:
                startActivity(new Intent(SettingActivity.this, ChangePayPasswdActivity.class));
                break;
            default:
                break;
        }

    }
}
